package com.gagakuai.infrastructure.utils;

import com.fasterxml.jackson.databind.ObjectMapper;

import java.util.Map;

/**
 * @description:
 * @author: houhong
 * @create: 2024-09-07 16:52
 **/
public final class JacksonUtils {

    private static final ObjectMapper objectMapper = new ObjectMapper();

    public static <T> Map<String, Object> objToMap(T t) {
        return objectMapper.convertValue(t, Map.class);
    }

}
